package com.taotao.manage.controller;

import com.taotao.manage.pojo.ItemDesc;
import com.taotao.manage.service.ItemDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/item/desc")
@RestController
public class ItemDescController {

    @Autowired
    private ItemDescService itemDescService;
    /**
     * 根据商品Id查询商品描述
     */
    @RequestMapping(value = "/{itemId}",method = RequestMethod.GET)
    public ItemDesc queryItemDescByItemId(@PathVariable("itemId")Long itemId){
        return itemDescService.queryById(itemId);
    }
}
